<?php
require_once 'DBConnecter.inc';
class Evaluation extends DBConnecter {
	public $i = 0;
	
	
	
	public $tab1 = "";
	public $tab2 = "";
	public $tab3 = "";
	public $tab4 = "";
	
	public $tab1_val = "";
	public $tab2_val = "";
	public $tab3_val = "";
	public $tab4_val = "";
	
	function __construct() {
		$this->connectDB ();
		// $this->selectDB ( 'devdog' );
	}
	
	public function createEvaluation($mem_id,$h_mem_id,$chkscore,$maxscore,$classcode,$work_time) {
		$sql = "CALL " . self::CONST_DB . ".eval_result('1','" . $mem_id . "','" . $h_mem_id . "','" . $chkscore . "','" . $maxscore . "','" . $classcode . "','" . $work_time . "');select @out_err_cd, @out_err_msg;";
		//echo $sql;
		$rs = $this->getMySqlConneter ()->multi_query ( $sql );
	}
	public function createEvaluation_grade($table,$work_time,$mem_id,$total_score,$grade) {
		$sql = "CALL " . self::CONST_DB . ".eval_grade_data('".$table."','".$work_time."','".$mem_id."','".$total_score."','".$grade."');select @out_err_cd, @out_err_msg;";
		//echo $sql;
		$rs = $this->getMySqlConneter ()->multi_query ( $sql );
	}
	public function createEvaluation_rate($table,$work_time,$rate1,$rate2,$sdate,$edate) {
		$sql = "CALL " . self::CONST_DB . ".eval_rate_data('".$table."','".$work_time."','".$rate1."','".$rate2."','".$sdate."','".$edate."');select @out_err_cd, @out_err_msg;";
		//echo $sql;
		$rs = $this->getMySqlConneter ()->multi_query ( $sql );
	}
	
	public function search4table_user($table,$work_time,$mem_id){
		echo "<thead>";
		echo "<tr>";
		echo "<th>사번</th>";
		echo "<th>이름</th>";
		echo "<th>날짜</th>";
		echo "<th>평가상태</th>";
		echo "<th>평가등급</th>";
		echo "</tr>";
		echo "</thead>";
	
		echo "<tbody>";
		$sql = "CALL ".self::CONST_DB.".eval_search('" . $table . "','" . $work_time . "','" . $mem_id . "');select @out_err_cd, @out_err_msg;";
		
		
		
		$retval = array ();
		if ($rs = $this->getMySqlConneter ()->multi_query ( $sql )) {
			if ($rs != null && $rs = $this->getMySqlConneter ()->use_result ()) {
				while ( $row = $rs->fetch_row () ) {
					$this->mem_id = $row ['0']; // 사번
					$this->mem_nm = $row ['1']; // 성명
					$this->work_time = $row ['2']; // 평가일
					$this->eval_state = $row ['3']; // 평가상태
					$this->eval_grade = $row ['4']; // 평가등급
					$this->tablePrint ( $isSuperAdmin );
				}
				$rs->free ();
			}
		}
		echo "</tbody>";
		
		
	}
	
public function search4table_rate($table,$work_time,$mem_id){
	
		echo "<thead>";
		echo "<tr>";
		echo "<th>분기</th>";
		echo "<th>수익률</th>";
		echo "<th>성장률</th>";
		echo "</tr>";
		echo "</thead>";
	
		echo "<tbody>";
		$sql = "CALL ".self::CONST_DB.".eval_search('" . $table . "','" . $work_time . "','" . $mem_id . "');select @out_err_cd, @out_err_msg;";
		$retval = array ();
		if ($rs = $this->getMySqlConneter ()->multi_query ( $sql )) {
			if ($rs != null && $rs = $this->getMySqlConneter ()->use_result ()) {
				while ( $row = $rs->fetch_row () ) {
					$this->quarter = $row ['0']; // 사번
					$this->profit = $row ['1']; // 성명
					$this->grow = $row ['2']; // 평가일
					$this->tablePrint2 ( $isSuperAdmin );
				}
				$rs->free ();
			}
		}		
		echo "</tbody>";
	}
	
public function search4table_question($table,$work_time,$mem_id){
	
	
		$sql = "CALL ".self::CONST_DB.".eval_search('" . $table . "','" . $work_time . "','" . $mem_id . "');select @out_err_cd, @out_err_msg;";
		$i = 0;
		$retval = array ();
		$prev_id=0;
		$prev_color=true;
		if ($rs = $this->getMySqlConneter ()->multi_query ( $sql )) {
			if ($rs != null && $rs = $this->getMySqlConneter ()->use_result ()) {
				while ( $row = $rs->fetch_row () ) {
					$this->val01 = $mem_id; // 평가자ID
					$this->val02 = $row ['0']; // 피평가자ID
					$this->val03 = $row ['1']; // 피평가자이름
					$this->val04 = $row ['2']; // 피평가자등급
					$this->val05 = $row ['3']; // 질문분류
					$this->val06 = $row ['4']; // 질문
					$this->val07 = $row ['5']; // 총점
					$this->val08 = $row ['6']; // 피평가자직책
					$this->val09 = $row ['7']; // 평가요소
					
					//문제가 나열될 때 사람별로 나누어주기 위해 아래와 같이 분기 추가
					if ($prev_id == 0) {
						$this->tablePrint3 ( $i, true );
						$prev_id = $this->val02;
					} else {
						if ($prev_id != $this->val02) {
							$prev_color = !$prev_color;
							$prev_id = $this->val02;
						}
						$this->tablePrint3 ( $i, $prev_color );
					}
					
					$i = $i + 1;
				}
				echo "<input type='hidden' name='list_cnt' value='".$i."'>";
				echo "<input type='hidden' name='timecheck' value='".$_GET[timecheck]."'>";
				$rs->free ();
				
				if($this->tab1_val != ""){
					if($this->tab1_val != ""){
						$active1 = ' class="active"';
						$active2 = ' in active';
					}else{
						$active1 = '';
						$active2 = '';
					}
					$this->tab1 = "<li role='presentation' ".$active1."><a href='#tab10' id='tab1' role='tab' data-toggle='tab' aria-controls='tab10'>자가평가</a></li>";
					$this->tab1_val = "<div role='tabpanel' class='tab-pane fade ".$active2."' id='tab10' aria-labelledBy='tab1'>".$this->tab1_val;
					$this->tab1_val .= "</tbody>";
					$this->tab1_val .= "</table>";
					$this->tab1_val .= "</div>";
				}
				if($this->tab2_val != ""){
					if($this->tab1_val == ""){
						$active1 = ' class="active"';
						$active2 = ' in active';
					}else{
						$active1 = '';
						$active2 = '';
					}
					$this->tab2 = "<li role='presentation' ".$active1."><a href='#tab20' id='tab2' role='tab' data-toggle='tab' aria-controls='tab20'>팀원평가</a></li>";
					$this->tab2_val = "<div role='tabpanel' class='tab-pane fade ".$active2."' id='tab20' aria-labelledBy='tab2'>".$this->tab2_val;
					$this->tab2_val .= "</tbody>";
					$this->tab2_val .= "</table>";
					$this->tab2_val .= "</div>";
				}
				if($this->tab3_val != ""){
					if($this->tab1_val == "" && $this->tab2_val == ""){
						$active1 = ' class="active"';
						$active2 = ' in active';
					}else{
						$active1 = '';
						$active2 = '';
					}
					$this->tab3 = "<li role='presentation' ".$active1."><a href='#tab30' id='tab3' role='tab' data-toggle='tab' aria-controls='tab30'>팀장평가</a></li>";
					$this->tab3_val = "<div role='tabpanel' class='tab-pane fade ".$active2."' id='tab30' aria-labelledBy='tab3'>".$this->tab3_val;
					$this->tab3_val .= "</tbody>";
					$this->tab3_val .= "</table>";
					$this->tab3_val .= "</div>";
				}
				if($this->tab4_val != ""){
					if($this->tab1_val == "" && $this->tab2_val == "" && $this->tab3_val == ""){
						$active1 = ' class="active"';
						$active2 = ' in active';
					}else{
						$active1 = '';
						$active2 = '';
					}
					$this->tab4 = "<li role='presentation' ".$active1."><a href='#tab40' id='tab4' role='tab' data-toggle='tab' aria-controls='tab40'>임원평가</a></li>";
					$this->tab4_val = "<div role='tabpanel' class='tab-pane fade ".$active2."' id='tab40' aria-labelledBy='tab4'>".$this->tab4_val;
					$this->tab4_val .= "</tbody>";
					$this->tab4_val .= "</table>";
					$this->tab4_val .= "</div>";
				}
			}
		}
		echo "</tbody>";
	}
	public function search4table_result($table,$work_time,$mem_id){
		echo "<thead>";
		echo "<tr>";
		echo "<th>이름</th>";
		echo "<th>사번</th>";
		echo "<th>날짜</th>";
		echo "<th>자기평가</th>";
		echo "<th>팀원평가</th>";
		echo "<th>팀장평가</th>";
		echo "<th>임원평가</th>";
		echo "<th>대표평가</th>";
		echo "<th>수익률</th>";
		echo "<th>성장률</th>";
		echo "<th>합산점수</th>";
		echo "<th>등급</th>";
		echo "<th>완료</th>";
		echo "</tr>";
		echo "</thead>";
	
		echo "<tbody>";
		$sql = "CALL ".self::CONST_DB.".eval_search('" . $table . "','" . $work_time . "','" . $mem_id . "');select @out_err_cd, @out_err_msg;";
		$retval = array ();
		$color = '#ffffff';
		$i = 0;
		if ($rs = $this->getMySqlConneter ()->multi_query ( $sql )) {
			if ($rs != null && $rs = $this->getMySqlConneter ()->use_result ()) {
				while ( $row = $rs->fetch_row () ) {
					$this->val00 = $row ['0']; // 이름
					$this->val01 = $row ['1']; // 사번
					$this->val02 = $row ['2']; // 날짜
					$this->val03 = $row ['3']; // 총카운트
					$this->val04 = $row ['4']; // 자기평가점수
					$this->val05 = $row ['5']; // 자기평가카운트
					$this->val06 = $row ['6']; // 팀원평가점수
					$this->val07 = $row ['7']; // 팀원평가카운트
					$this->val08 = $row ['8']; // 팀장평가점수
					$this->val09 = $row ['9']; // 팀장평가카운트
					$this->val10 = $row ['10']; // 임원평가점수
					$this->val11 = $row ['11']; // 임원평가카운트
					$this->val12 = $row ['12']; // 대표평가점수
					$this->val13 = $row ['13']; // 대표평가카운트
					$this->val14 = $row ['14']; // 수익률점수
					$this->val15 = $row ['15']; // 수익률카운트
					$this->val16 = $row ['16']; // 성장률점수
					$this->val17 = $row ['17']; // 성장률카운트
					$this->val18 = $row ['18']; // 합산점수
					$this->val19 = $row ['19']; // 등급
					$this->val20 = $row ['20']; // 완료가능여부

					if($this->val00 != $before){
						if($color == '#ffffff'){
							$color = '#57E9E1';
						}else{
							$color = '#ffffff';
						}
					}
					
					$before = $this->val00;
					
					$this->tablePrint4 ($color,$i,$mem_id);
					
					$i = $i + 1;
						
					
				}
				$rs->free ();
			}
		}
		echo "</tbody>";
	}
	public function search4table_setting($table,$work_time,$mem_id){
		echo "<thead>";
		echo "<tr>";
		echo "<th>평가기준일</th>";
		echo "<th>평가기간(시작)</th>";
		echo "<th>평가기간(종료)</th>";
		echo "<th>수익률</th>";
		echo "<th>성장률</th>";
		echo "<th>저장</th>";
		echo "<th>삭제</th>";
		echo "</tr>";
		echo "</thead>";
	
		echo "<tbody>";
		$sql = "CALL ".self::CONST_DB.".eval_search('" . $table . "','" . $work_time . "','" . $mem_id . "');select @out_err_cd, @out_err_msg;";
		//echo $sql;
		$retval = array ();
		$color = '#ffffff';
		$i = 0;
		if ($rs = $this->getMySqlConneter ()->multi_query ( $sql )) {
			if ($rs != null && $rs = $this->getMySqlConneter ()->use_result ()) {
				while ( $row = $rs->fetch_row () ) {
					$this->val00 = $row ['0']; // 이름
					$this->val01 = $row ['1']; // 사번
					$this->val02 = $row ['2']; // 날짜
					$this->val03 = $row ['3']; // 총카운트
					$this->val04 = $row ['4']; // 자기평가점수
					$this->val05 = $row ['5']; // 자기평가점수
					if($this->val00 != $before){
						if($color == '#ffffff'){
							$color = '#57E9E1';
						}else{
							$color = '#ffffff';
						}
					}
						
					$before = $this->val00;
						
					$this->tablePrint5 ($color,$i,$mem_id);
						
					$i = $i + 1;
	
						
				}
				$rs->free ();
			}
		}
		echo "</tbody>";
	}
	
	public function tablePrint($isSuperAdmin) {
		echo "<tr align='center'>";
		echo "<td>" . $this->mem_id . "</td>";
		echo "<td>" . $this->mem_nm . "</td>";
		echo "<td>" . $this->work_time . "</td>";
		echo "<td>" . $this->eval_state . "</td>";
		echo "<td>" . $this->eval_grade . "</td>";
		echo "</tr>";
	}
	public function tablePrint2($isSuperAdmin) {
		echo "<tr align='center'>";
		echo "<td>" . $this->quarter . "</td>";
		echo "<td>" . $this->profit . "</td>";
		echo "<td>" . $this->grow . "</td>";
		echo "</tr>";
	}
	public function tablePrint3($num, $bg) {
		
		if($this->val05 == '101' || $this->val05 == '107'){
			if($this->tab1_val == ""){
				$this->tab1_val .= "<table class='table table-bordered' id='attendance_table'>";
				$this->tab1_val .=  "<thead>";
				$this->tab1_val .=  "<tr>";
				$this->tab1_val .=  "<th>평가요소</th>";
				$this->tab1_val .=  "<th>질문</th>";
				$this->tab1_val .=  "</tr>";
				$this->tab1_val .=  "</thead>";
				$this->tab1_val .=  "<tbody>";
			}
			
			$this->tab1_val .= "<tr align='center'>";
			$this->tab1_val .= "<input type='hidden' name='mem_id".$num."' id='mem_id".$num."' value='". $this->val01 ."'>";
			$this->tab1_val .= "<input type='hidden' name='h_mem_id".$num."' id='h_mem_id".$num."' value='". $this->val02 ."'>";
			$this->tab1_val .= "<input type='hidden' name='classcode".$num."' id='classcode".$num."' value='". $this->val05 ."'>";
			$this->tab1_val .= "<input type='hidden' name='maxscore".$num."' id='maxscore".$num."' value='". $this->val07 ."'>";
			
			$this->tab1_val .= "<td align='center'>".$this->val09."</td>";
			$this->tab1_val .= "<td align='left'>" . $this->val06 . "</td>";
			$this->tab1_val .= "</tr>";
			$this->tab1_val .= "<tr align='center'>";
			$this->tab1_val .= "<td></td>";
			$this->tab1_val .= "<td align='left'>";
			$this->tab1_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' value='" . ($this->val07/5*5) . "'>매우탁월";
			$this->tab1_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*4) . "'>탁월";
			$this->tab1_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*3) . "'>보통";
			$this->tab1_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*2) . "'>미흡";
			$this->tab1_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*1) . "' checked>매우미흡";
			$this->tab1_val .= "</td>";
			$this->tab1_val .= "</tr>";
			
		}else if($this->val05 == '102' || $this->val05 == '108' || $this->val05 == '110' || $this->val05 == '112'){
			if($this->tab2_val == ""){
				
				$this->tab2_val .= "<table border=1 class='table table-bordered' id='attendance_table'>";
				$this->tab2_val .=  "<thead>";
				$this->tab2_val .=  "<tr>";
				$this->tab2_val .=  "<th>평가요소</th>";
				$this->tab2_val .=  "<th>질문</th>";
				$this->tab2_val .=  "</tr>";
				$this->tab2_val .=  "</thead>";
				$this->tab2_val .=  "<tbody>";
				
			}
			
			
			if ($bg) {
				$this->tab2_val .= "<tr align='center'>";
			} else {
				$this->tab2_val .= "<tr align='center' style='background-color: whitesmoke;'>";
			}
			$this->tab2_val .= "<input type='hidden' name='mem_id".$num."' id='mem_id".$num."' value='". $this->val01 ."'>";
			$this->tab2_val .= "<input type='hidden' name='h_mem_id".$num."' id='h_mem_id".$num."' value='". $this->val02 ."'>";
			$this->tab2_val .= "<input type='hidden' name='classcode".$num."' id='classcode".$num."' value='". $this->val05 ."'>";
			$this->tab2_val .= "<input type='hidden' name='maxscore".$num."' id='maxscore".$num."' value='". $this->val07 ."'>";
				
			$this->tab2_val .= "<td align='center'>".$this->val09."</td>";
			$this->tab2_val .= "<td align='left'>" . $this->val03 . " " . $this->val08 . " 은(는) " . $this->val06 . "</td>";
			$this->tab2_val .= "</tr>";
			if ($bg) {
				$this->tab2_val .= "<tr align='center'>";
			} else {
				$this->tab2_val .= "<tr align='center' style='background-color: whitesmoke;'>";
			}
			$this->tab2_val .= "<td></td>";
			$this->tab2_val .= "<td align='left'>";
			$this->tab2_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' value='" . ($this->val07/5*5) . "'>매우탁월";
			$this->tab2_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*4) . "'>탁월";
			$this->tab2_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*3) . "'>보통";
			$this->tab2_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*2) . "'>미흡";
			$this->tab2_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*1) . "' checked>매우미흡";
			$this->tab2_val .= "</td>";
			$this->tab2_val .= "</tr>";
			
			
		}else if($this->val05 == '103' || $this->val05 == '111' || $this->val05 == '113'){
			if($this->tab3_val == ""){
				
				$this->tab3_val .= "<table border=1 class='table table-bordered' id='attendance_table'>";
				$this->tab3_val .=  "<thead>";
				$this->tab3_val .=  "<tr>";
				$this->tab3_val .=  "<th>평가요소</th>";
				$this->tab3_val .=  "<th>질문</th>";
				$this->tab3_val .=  "</tr>";
				$this->tab3_val .=  "</thead>";
				$this->tab3_val .=  "<tbody>";
			}
			
			
			if ($bg) {
				$this->tab3_val .= "<tr align='center'>";
			} else {
				$this->tab3_val .= "<tr align='center' style='background-color: whitesmoke;'>";
			}
			$this->tab3_val .= "<input type='hidden' name='mem_id".$num."' id='mem_id".$num."' value='". $this->val01 ."'>";
			$this->tab3_val .= "<input type='hidden' name='h_mem_id".$num."' id='h_mem_id".$num."' value='". $this->val02 ."'>";
			$this->tab3_val .= "<input type='hidden' name='classcode".$num."' id='classcode".$num."' value='". $this->val05 ."'>";
			$this->tab3_val .= "<input type='hidden' name='maxscore".$num."' id='maxscore".$num."' value='". $this->val07 ."'>";
				
			$this->tab3_val .= "<td align='center'>" . $this->val09 . "</td>";
			$this->tab3_val .= "<td align='left'>" . $this->val03 . " " . $this->val08 . " 은(는) " . $this->val06 . "</td>";
			$this->tab3_val .= "</tr>";
			if ($bg) {
				$this->tab3_val .= "<tr align='center'>";
			} else {
				$this->tab3_val .= "<tr align='center' style='background-color: whitesmoke;'>";
			}
			$this->tab3_val .= "<td></td>";
			$this->tab3_val .= "<td align='left'>";
			$this->tab3_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' value='" . ($this->val07/5*5) . "'>매우탁월";
			$this->tab3_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*4) . "'>탁월";
			$this->tab3_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*3) . "'>보통";
			$this->tab3_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*2) . "'>미흡";
			$this->tab3_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*1) . "' checked>매우미흡";
			$this->tab3_val .= "</td>";
			$this->tab3_val .= "</tr>";
		}else if($this->val05 == '104' || $this->val05 == '109' || $this->val05 == '114'){
			if($this->tab4_val == ""){
				
				$this->tab4_val .= "<table border=1 class='table table-bordered' id='attendance_table'>";
				$this->tab4_val .=  "<thead>";
				$this->tab4_val .=  "<tr>";
				$this->tab4_val .=  "<th>평가요소</th>";
				$this->tab4_val .=  "<th>질문</th>";
				$this->tab4_val .=  "</tr>";
				$this->tab4_val .=  "</thead>";
				$this->tab4_val .=  "<tbody>";
			}
			
			
			if ($bg) {
				$this->tab4_val .= "<tr align='center'>";
			} else {
				$this->tab4_val .= "<tr align='center' style='background-color: whitesmoke;'>";
			}
			$this->tab4_val .= "<input type='hidden' name='mem_id".$num."' id='mem_id".$num."' value='". $this->val01 ."'>";
			$this->tab4_val .= "<input type='hidden' name='h_mem_id".$num."' id='h_mem_id".$num."' value='". $this->val02 ."'>";
			$this->tab4_val .= "<input type='hidden' name='classcode".$num."' id='classcode".$num."' value='". $this->val05 ."'>";
			$this->tab4_val .= "<input type='hidden' name='maxscore".$num."' id='maxscore".$num."' value='". $this->val07 ."'>";
				
			$this->tab4_val .= "<td align='center'>" . $this->val09 . "</td>";
			$this->tab4_val .= "<td align='left'>" . $this->val03 . " " . $this->val08 . " 은(는) " . $this->val06 . "</td>";
			$this->tab4_val .= "</tr>";
			if ($bg) {
				$this->tab4_val .= "<tr align='center'>";
			} else {
				$this->tab4_val .= "<tr align='center' style='background-color: whitesmoke;'>";
			}
			$this->tab4_val .= "<td></td>";
			$this->tab4_val .= "<td align='left'>";
			$this->tab4_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' value='" . ($this->val07/5*5) . "'>매우탁월";
			$this->tab4_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*4) . "'>탁월";
			$this->tab4_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*3) . "'>보통";
			$this->tab4_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*2) . "'>미흡";
			$this->tab4_val .= "<input type='radio' name='chkscore".$num."' id='chkscore".$num."' style='margin-left:10px;' value='" . ($this->val07/5*1) . "' checked>매우미흡";
			$this->tab4_val .= "</td>";
			$this->tab4_val .= "</tr>";
		}
	}
	public function tablePrint4($color,$num,$mem_id) {
		echo "<tr align='center' bgcolor='".$color."'>";
		echo "<td>" . $this->val00 . "</td>";
		echo "<td>" . $this->val01 . "<input type='hidden' id='mem_id".$num."' value='".$this->val01."'></td>";
		echo "<td>" . $this->val02 . "(".$this->val03.")<input type='hidden' id='work_time".$num."' value='".$this->val02."'></td>";
		echo "<td>" . $this->val04 . "(".$this->val05.")</td>";
		echo "<td>" . $this->val06 . "(".$this->val07.")</td>";
		echo "<td>" . $this->val08 . "(".$this->val09.")</td>";
		echo "<td>" . $this->val10 . "(".$this->val11.")</td>";
		echo "<td>" . $this->val12 . "(".$this->val13.")</td>";
		echo "<td>" . $this->val14 . "(".$this->val15.")</td>";
		echo "<td>" . $this->val16 . "(".$this->val17.")</td>";
		echo "<td>" . $this->val18 . "<input type='hidden' id='total_score".$num."' value='".$this->val18."'></td>";
		echo "<td><input type='text' id='grade".$num."' maxlength='2' style='width:50px;text-align:center;' value='" . $this->val19 . "' ></td>";
		if($this->val20 == '1' and $mem_id == '100001'){
			echo "<td><input type='button' value='완료' onclick='eval_submit(".$num.")'></td>";
		}else if($this->val20 == '2'){
			echo "<td>평가완료</td>";
		}else{
			echo "<td></td>";
		}
		echo "</tr>";
	}
	public function tablePrint5($color,$num,$mem_id) {
		echo "<tr align='center' bgcolor='".$color."'>";
		echo "<td>" . $this->val00 . "<input type='hidden' id='work_time".$num."' value='".substr($this->val00,4,10)."'></td>";
		echo "<td>" . $this->val01 . "</td>";
		echo "<td>" . $this->val02 . "</td>";
		echo "<td><input type='text' id='rate1".$num."' maxlength='3' onkeyup='javascript:checkNumber(this, false)' style='width:50px;text-align:center;' value='" . $this->val03 . "' ></td>";
		echo "<td><input type='text' id='rate2".$num."' maxlength='3' onkeyup='javascript:checkNumber(this, false)' style='width:50px;text-align:center;' value='" . $this->val04 . "' ></td>";
		
	if($this->val03 == '' and $this->val04 == ''){
			echo "<td><input type='button' value='저장' onclick='eval_submit(1,".$num.")'></td>";
		}else{
			echo "<td></td>";
		}
		
		if($this->val05 == '0'){
			echo "<td><input type='button' value='삭제' onclick='eval_submit(2,".$num.")'></td>";
		}else{
			echo "<td></td>";
		}
		
		echo "</tr>";
	}
	
}